package com.sbj.dto.utils;

import cn.hutool.core.util.NumberUtil;

import java.math.BigDecimal;

/**
 * @author summer
 * @version 1.0
 * @date 2024/8/29 10:20
 */
public class AmountUtil {

    public static BigDecimal scale(BigDecimal amount, int scale) {
        BigDecimal div = NumberUtil.div(new BigDecimal(scale), 100);
        return NumberUtil.mul(div, amount);
    }
}
